<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <style>
        img{
            width: 80px;
            height: 100px;
        }

        #outer{
            position: absolute;
            display: none;
        }
    </style>
</head>
<body>
    <div id="outer">
        <img src="../imgs/sb.jpg" alt="">
    </div>

    <script>
        let div = document.getElementById("outer");
        document.onmousemove=function(event){
            div.style.display="block";

            let e = event || window.event;
            let x = e.clientX;
            let y = e.clientY;

            div.style.left=x+"px";
            div.style.top=y+"px";

        }
    </script>
</body>
</html>